package com.ruoyi.system.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.product.mapper.ServiceBookProductOrdersMapper;
import com.ruoyi.system.product.domain.ServiceBookProductOrders;
import com.ruoyi.system.product.service.IServiceBookProductOrdersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商品进货单Service业务层处理
 * 
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceBookProductOrdersServiceImpl implements IServiceBookProductOrdersService 
{
    @Autowired
    private ServiceBookProductOrdersMapper serviceBookProductOrdersMapper;

    /**
     * 查询商品进货单
     * 
     * @param id 商品进货单ID
     * @return 商品进货单
     */
    @Override
    public ServiceBookProductOrders selectServiceBookProductOrdersById(Long id)
    {
        return serviceBookProductOrdersMapper.selectServiceBookProductOrdersById(id);
    }

    /**
     * 查询商品进货单列表
     * 
     * @param serviceBookProductOrders 商品进货单
     * @return 商品进货单
     */
    @Override
    public List<ServiceBookProductOrders> selectServiceBookProductOrdersList(ServiceBookProductOrders serviceBookProductOrders)
    {
        return serviceBookProductOrdersMapper.selectServiceBookProductOrdersList(serviceBookProductOrders);
    }

    /**
     * 新增商品进货单
     * 
     * @param serviceBookProductOrders 商品进货单
     * @return 结果
     */
    @Override
    public int insertServiceBookProductOrders(ServiceBookProductOrders serviceBookProductOrders)
    {
        return serviceBookProductOrdersMapper.insertServiceBookProductOrders(serviceBookProductOrders);
    }

    /**
     * 修改商品进货单
     * 
     * @param serviceBookProductOrders 商品进货单
     * @return 结果
     */
    @Override
    public int updateServiceBookProductOrders(ServiceBookProductOrders serviceBookProductOrders)
    {
        return serviceBookProductOrdersMapper.updateServiceBookProductOrders(serviceBookProductOrders);
    }

    /**
     * 删除商品进货单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductOrdersByIds(String ids)
    {
        return serviceBookProductOrdersMapper.deleteServiceBookProductOrdersByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商品进货单信息
     * 
     * @param id 商品进货单ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductOrdersById(Long id)
    {
        return serviceBookProductOrdersMapper.deleteServiceBookProductOrdersById(id);
    }
}
